using EventHandlerDemo.Application.Orders;
using Microsoft.AspNetCore.Mvc;

namespace EventHandlerDemo.WebApi.Controllers;

[ApiController]
[Route("[controller]")]
public class OrderController : ControllerBase
{
    private readonly IOrderAppService _orderAppService;

    public OrderController(IOrderAppService orderAppService)
    {
        _orderAppService = orderAppService;
    }

    [HttpPost]
    public async Task<int> CreateAsync()
    {
        var result = await _orderAppService.CreateaAsync();
        return result;
    }
}